#include <iostream>
using namespace std;
int kai (int);
int main ()
{
	int n;
	cin>>n;
	cout<<kai (n);
	return 0;
}
int kai (int s)
{
	return s==1?1:s*kai (s-1);
}
